package com.pignest.hotel.beans;

import com.pignest.hotel.annotation.Bean;
import com.pignest.hotel.beans.global.BaseBean;

@Bean("用户角色")
public class UserRole extends BaseBean {
	private static final long serialVersionUID = 3578612433716158149L;
	
	private User user;
	private Role role;
	
	public UserRole() {
	}
	public UserRole(User user, Role role) {
		this.user = user;
		this.role = role;
	}
	
	public Role getRole() {
		return role;
	}
	public void setRole(Role role) {
		this.role = role;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	@Override
	public String toSimpleString() {
		return user.toSimpleString() + "|" + role.toSimpleString();
	}
}
